import { _decorator, CCFloat, Component, Node, PlaneCollider } from 'cc';
import { Player } from '../Actor/Player/Player';
import { PlayerManager } from '../Actor/Player/PlayerManager';
const { ccclass, property } = _decorator;

@ccclass('Skill')
export class Skill extends Component {
    @property coolDown: number = 0;
    protected coolDownTimer: number = 0;

    protected player:Player;

    protected start(): void {
        this.player = PlayerManager.inst.player;
    }

    protected update(dt: number): void {
        this.coolDownTimer -= dt;
    }
    public CanUseSkill(): boolean {
        if (this.coolDownTimer <= 0) {
            this.UseSkill()
            this.coolDownTimer = this.coolDown;
            return true;
        }
        return false;

    }
    public UseSkill():void{

    }
}


